package com.onlyphoto.onlymall.mvp.model

import com.onlyphoto.onlymall.api.Urls
import com.onlyphoto.onlymall.base.BaseModel
import com.onlyphoto.onlymall.base.BaseObserver
import com.onlyphoto.onlymall.bean.response.ArticleBean
import com.onlyphoto.onlymall.utils.ConfigUtil
import com.onlyphoto.onlymall.utils.RxTransformer


class MQuestionImpl : BaseModel() {
    fun getFaq(getType: Int, articleType: Int, baseObserver: BaseObserver<ArrayList<ArticleBean>>) {
        val url = ConfigUtil.instance.getUrl(Urls.ARTICLE)
        apiService().getArticle(url, getType, articleType)
                .compose(RxTransformer.switchSchedulers(this))
                .subscribe(baseObserver)
    }
}
